<template>
  <el-dialog title="入库详情" :visible.sync="dialogTableVisible">

    <el-table :data="gatherdetail">
      <el-table-column property="warehouseInfo.warName" label="仓库名称"></el-table-column>
      <el-table-column property="warehouseInfo.warMaxStock" label="仓库最大库存"></el-table-column>
      <el-table-column property="supplierSupplyOfGoods.user.uname" label="供应商名称"></el-table-column>
      <el-table-column property="supplierSupplyOfGoods.shop.shopName" label="商品名称"></el-table-column>
      <el-table-column property="supplierSupplyOfGoods.supplierPrice" label="价格"></el-table-column>
      <el-table-column property="shopNum" label="入库数量"></el-table-column>
    </el-table>
    <!-- 分页 -->
    <el-pagination
      @size-change="handleSizeChange"
      @current-change="handleCurrentChange"
      :current-page="pageno"
      :page-sizes="[5, 10, 15, 20]"
      :page-size="pagesize"
      layout="total, sizes, prev, pager, next, jumper"
      :total="total"
    >
    </el-pagination>
  </el-dialog>
</template>

<script>
    export default {
        name: "gather_info_queryAll",
      data(){
          return{
            pageno: 1,
            pagesize: 5,
            total: 1,
            dialogTableVisible:false,
            gatherdetails:{gatherId:""},
            gatherdetail:[]
          }
      },
      methods:{
          getgatherdetaildata(){
            var params = new URLSearchParams();
            params.append("pageno", this.pageno);
            params.append("pagesize", this.pagesize);
            params.append("gatherId",this.gatherdetails.gatherId)
            this.$axios.get("gatherDetailInfo/queryAlldetail.action",{params:params}).then(res=>{
              this.gatherdetail=res.data.records;
              this.total=res.data.total;
            }).catch(error=>{
              this.$message.error(error)
            })
          },
        handleSizeChange(val) {
          //每页范围
          this.pagesize = val;
          this.getgatherdetaildata();
        },
        handleCurrentChange(val) {
          //当前页
          this.pageno = val;
          this.getgatherdetaildata();
        },
      }
    }
</script>

<style scoped>

</style>
